Regulating power using a fuzzy logic control system

ABSTRACT

Metrics representing a combined measure of power used by a central processing unit (CPU) and power used by a graphics processing unit (GPU) are compared to a shared supply power and thermal power budgets. Power used by the CPU and power used by the GPU are regulated in tandem using a fuzzy logic control system that can implement fuzzy rules that describe the management within thermal and supply power design constraints of the platform.

RELATED UNITED STATES PATENT APPLICATION

This application is related to U.S. patent application Ser. No. ______by D. Wyatt, filed concurrently with this application, and entitled“Regulating Power Within a Shared Budget,” with Attorney Docket No.NVID-P-SC-09-0176-US1, assigned to the assignee of the presentinvention, and hereby incorporated by reference in its entirety.

BACKGROUND

Computer systems typically use evacuative cooling systems fortemperature control. Using one or more fans, outside air is drawn inthrough vents, pulled through and around the internal components, over aheat exchanger assembly, and then is pushed out through other vents.Heat generated by the internal components—in particular, the centralprocessing unit (CPU) and graphics processing unit (GPU)—is conducted byheat pipes into the heat exchanger assembly and thereby removed from thesystem.

In most systems, the CPU and GPU constitute the largest sources of heatloads. For example, in a typical notebook device, the CPU and GPUtogether can contribute up to 70 watts of thermal power, and up to 100watts in a high end configuration. The next largest contributor isusually the memory subsystem, which generally peaks at around eightwatts. The total system cooling capability of a typically dimensionednotebook is about 85 watts, and so the majority of the coolingcapability is directed into the heat exchanger system for the CPU andGPU. Thus, the CPU and GPU present the largest thermal power managementchallenge, affecting system design, form factors, and componentpurchasing decisions. In other words, a device's target form factor andimplied cooling capabilities can limit a designer's choice of GPU due toassumptions that need to be made about the worst-case thermal effects ofboth the GPU and CPU.

If the thermal contributions of the computer system's internalcomponents are not mitigated, then the temperatures of those componentscan increase until either the components self-throttle in order to avoidexceeding their respective temperature limit, or the inability toadequately remove heat from the system causes one or more components tooverheat. Overheating can damage internal components, and heatconduction and radiation into the device's chassis and skin (housing)may elevate surface temperatures to the point where the device feelsuncomfortably hot to a user.

SUMMARY

According to embodiments of the present invention, a closed loop thermalmanagement system implements a single, shared power budget for thelargest thermal contributors—namely, the CPU and GPU. The budget may bea shared thermal power budget, a shared supply power budget, or acombined use of both the shared thermal power budget and the sharedsupply power budget.

By focusing the solution on the CPU and GPU, fewer sensors are neededand consequently costs can be reduced. Also, embodiments of the thermalmanagement system are simplified relative to conventional systems, sothat they can be executed on-chip (e.g., in a system management unit orpower management unit on the GPU) in microcode instead of in the CPU orin an embedded controller. Furthermore, profiling the computer system'sresponses and thermal characteristics (e.g., thermal resistance andthermal time constants) is simplified.

Embodiments according to the present invention can utilize, for example,thermal energy (integrated power) over a flexible time interval (e.g., asliding window of time) as the metric of interest rather than simplyusing only power or temperature, although power and temperaturethresholds as well as other thresholds are supported. Other metrics canbe utilized. By tracking the accumulation of power over time, thethermal management system can readily accommodate faster powertransients (spikes) while also mitigating sustained heat loads.

In one embodiment, the integral of the CPU and GPU power contributions,or the integral sum of those contributions, is compared to the budget.If the budget is exceeded, then the CPU and/or GPU can be“throttled”—for example, the power-performance state (thevoltage-frequency operating point, or p-state) of the CPU and/or GPU canbe adjusted depending on the control policy in place. For example, onecontrol policy may be GPU-centric, favoring the GPU such that the speedof the CPU but not the GPU is reduced when the budget is exceeded, whileanother control policy may favor the CPU over the GPU. Other types ofcontrol policies can also be instituted.

The control system can also determine predicted future thermal powerloads—for example, the expected maximum thermal power generation basedon knowledge of current workloads, utilization, and p-states. Using suchinformation, the speed of cooling/exhaust fan(s) can be reduced, therebyreducing acoustic levels and improving system ergonomics. For example,the cooling fan's acoustic footprint may proportional to the fan speed,and the fan speed can be reduced to optimize acoustics if the powermetric is less than the budget.

Furthermore, the inventive thermal management system can detectscenarios in which the CPU and/or GPU are wasting power, andconsequently can proactively limit wasted power without necessarilylimiting performance. For example, a priori application profilinginformation can be used to identify a known wasteful application, anddriver loading information can be used to detect when that applicationis executing. The application profiling information can be used toidentify when the speed or p-state of the CPU or GPU can be limitedwithout significantly affecting performance, visual experience, orquality. This also has the effect of preserving battery life.

Embodiments according to the invention can be implemented in conjunctionwith or in lieu of legacy thermal management systems. In one embodiment,the inventive thermal management system performs a handshake with thelegacy system before taking control. The inventive system canperiodically send signals to the legacy system to indicate that theinventive system remains functional and in control.

In one embodiment, the inventive thermal management system uses fuzzylogic control, although classical proportional control may instead beutilized. In a proportional control system, the amount of control oradjustment is proportional to the error (e.g., the amount by which thebudget is exceeded). A fuzzy logic control system provides moreflexibility, relying on the use of rules that generalize systembehavior. Also, relative to a proportional control system, a fuzzy logiccontrol system is more likely to produce the proper response even withless accurate sensor data or little or no calibration.

By controlling and limiting the combined, sustained contributions of theCPU and GPU, the thermal solution can be reduced to less than the sum ofthe individual thermal design power or point (TDP) of those components;the power contributions of both the CPU and GPU are dynamically limitedso that the components, in combination, do not exceed the shared coolingcapability of the thermal solution. Consequently, a higher performanceGPU can be utilized in systems not otherwise designed to support thehigher power requirement of such a GPU, or a GPU can be introduced intoa system not normally designed with discrete graphics capability.Alternatively, all things being equal, the size of the computer system(e.g., its form factor) can be reduced.

These and other objects and advantages of the various embodiments of thepresent invention will be recognized by those of ordinary skill in theart after reading the following detailed description of the embodimentsthat are illustrated in the various drawing figures.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and form a part ofthis specification, illustrate embodiments of the present invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a block diagram of a thermal control system according to anembodiment of the invention.

FIG. 2 is a functional block diagram of an example of a platform orsystem upon which embodiments according to the invention can beimplemented.

FIG. 3 is a functional block diagram of another example of a platform orsystem upon which embodiments according to the invention can beimplemented.

FIGS. 4A, 4B, and 4C are examples of integrated power values versus timefor a combination of a CPU and GPU, a CPU, and a GPU, respectively, inan embodiment according to the invention.

FIG. 5 is a functional block diagram showing the flow of information inan example of a fuzzy logic control system according to an embodiment ofthe invention.

FIG. 6 illustrates an example of CPU power set membership according toan embodiment of the invention.

FIG. 7 illustrates the mapping of set membership to event (alarm)thresholds according to an embodiment of the invention.

FIG. 8 is a flowchart of an example of a computer-implemented thermalmanagement method according to embodiments of the invention.

FIG. 9 is a flowchart of another example of a computer-implementedthermal management method according to embodiments of the invention.

DETAILED DESCRIPTION OF THE INVENTION

Reference will now be made in detail to the various embodiments of thepresent invention, examples of which are illustrated in the accompanyingdrawings. While the invention will be described in conjunction withthese embodiments, it will be understood that they are not intended tolimit the invention to these embodiments. On the contrary, the inventionis intended to cover alternatives, modifications and equivalents, whichmay be included within the spirit and scope of the invention as definedby the appended claims. Furthermore, in the following detaileddescription of the present invention, numerous specific details are setforth in order to provide a thorough understanding of the presentinvention. However, it will be understood that the present invention maybe practiced without these specific details. In other instances,well-known methods, procedures, components, and circuits have not beendescribed in detail so as not to unnecessarily obscure aspects of thepresent invention.

Some portions of the detailed descriptions that follow are presented interms of procedures, logic blocks, processing, and other symbolicrepresentations of operations on data bits within a computer memory.These descriptions and representations are the means used by thoseskilled in the data processing arts to most effectively convey thesubstance of their work to others skilled in the art. In the presentapplication, a procedure, logic block, process, or the like, isconceived to be a self-consistent sequence of steps or instructionsleading to a desired result. The steps are those utilizing physicalmanipulations of physical quantities. Usually, although not necessarily,these quantities take the form of electrical or magnetic signals capableof being stored, transferred, combined, compared, and otherwisemanipulated in a computer system. It has proven convenient at times,principally for reasons of common usage, to refer to these signals astransactions, bits, values, elements, symbols, characters, samples,pixels, or the like.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the followingdiscussions, it is appreciated that throughout the present invention,discussions utilizing terms such as “comparing,” “sending,” “polling,”“receiving,” “regulating,” “using,” “accessing,” “determining,”“evaluating,” “selecting,” “executing” or the like, refer to actions andprocesses (e.g., flowcharts 800 and 900 of FIGS. 8 and 9, respectively)of a computer system or similar electronic computing device or processor(e.g., systems 200 and 300 of FIGS. 2 and 3, respectively). The computersystem or similar electronic computing device manipulates and transformsdata represented as physical (electronic) quantities within the computersystem memories, registers or other such information storage,transmission or display devices.

Embodiments described herein may be discussed in the general context ofcomputer-executable instructions residing on some form ofcomputer-usable medium, such as program modules, executed by one or morecomputers or other devices. By way of example, and not limitation,computer-usable media may comprise computer storage media andcommunication media. Generally, program modules include routines,programs, objects, components, data structures, etc., that performparticular tasks or implement particular abstract data types. Thefunctionality of the program modules may be combined or distributed asdesired in various embodiments.

Computer storage media includes volatile and nonvolatile, removable andnon-removable media implemented in any method or technology for storageof information such as computer-readable instructions, data structures,program modules or other data. Computer storage media includes, but isnot limited to, random access memory (RAM), read only memory (ROM),electrically erasable programmable ROM (EEPROM), flash memory or othermemory technology, compact disk ROM (CD-ROM), digital versatile disks(DVDs) or other optical storage, magnetic cassettes, magnetic tape,magnetic disk storage or other magnetic storage devices, or any othermedium that can be used to store the desired information and that canaccessed to retrieve that information.

Communication media can embody computer-readable instructions, datastructures, program modules or other data in a modulated data signalsuch as a carrier wave or other transport mechanism and includes anyinformation delivery media. The term “modulated data signal” means asignal that has one or more of its characteristics set or changed insuch a manner as to encode information in the signal. By way of example,and not limitation, communication media includes wired media such as awired network or direct-wired connection, and wireless media such asacoustic, radio frequency (RF), infrared and other wireless media.Combinations of any of the above can also be included within the scopeof computer-readable media.

Regulating Power within a Shared Budget

FIG. 1 is a block diagram that provides an overview of a control system100 according to an embodiment of the invention. The control system 100is a closed loop feedback control system with two “plants”—a centralprocessing unit (CPU) 102 and a graphics processing unit (GPU) 104 (inthe context of a control system, a “plant” refers to the set of elementsfor a particular process or operation, with fixed inputs and producing agiven output). In the example of FIG. 1, the inputs to the CPU 102 andthe GPU 104 identify a power performance state (a voltage-frequencyoperating point, or p-state) for each. Feedback from the sensors 108 and110 is provided to the inventive thermal management system 130. As willbe described in greater detail herein, the thermal management system 130compares the integral of the CPU and GPU power contributions, or theintegral sum of those contributions, to a single, shared power budget(the budget itself is actually an integral value). If the budget isexceeded, then the CPU 102 and/or GPU 104 can be throttled—for example,the p-state of the CPU and/or GPU can be adjusted (up or down) dependingon the control policy in place.

FIG. 2 is a functional block diagram of an example of a platform orsystem 200 upon which embodiments according to the invention can beimplemented. Only selected hardware and software elements are shown; thesystem may include other elements not shown or described. The system 200may be implemented as part of a computer system, such as but not limitedto a notebook or nettop type of device.

The system 200 includes a CPU 202 and a GPU 204. In the example of FIG.2, the GPU 204 is a motherboard GPU (mGPU), or integrated GPU. The GPU204 incorporates an on-chip system management unit (SMU) 206 that can beimplemented in hardware, as a microcontroller, for example. The SMU 206has access to and can control the CPU power sensor 208 and the GPU powersensor 210.

Because thermal power can be approximated from power consumption, thesensors 208 and 210, in one embodiment, read CPU power and GPU powerlevels directly from the power supply rails (e.g., on the power supplypaths between the voltage regulator and the CPU and GPU). Morespecifically, in the embodiment of FIG. 2, a shared power supply 240provides power to a CPU power supply 242 and a GPU power supply 244; thepower sensors 208 and 210 measure power from the power supplies 242 and244 to the CPU and GPU, respectively. The amount of power supplied bythe CPU power supply 242 and the GPU power supply 244 can be used tospecify a shared power supply power budget.

In the FIG. 2 embodiment, the sensors 208 and 210 are smart orintelligent sensors, having functionality beyond simply measuring power.For example, as will be further described, the sensors 208 and 210 canhave the capability to determine whether the monitored power hasexceeded a threshold value and, if so, can send an event signal over theevent line 211 to the SMU 206. Processing of the data can also beperformed, at least to some extent, by the smart sensors in order toreduce the amount of data traffic on the bus 212.

In response to an event signal, the SMU 206 can poll the sensors 208 and210 to retrieve their data through the bus 212, which may be an I2C(Inter-Integrated Circuit) bus. The SMU 206 can then compute anintegrated value of power over a flexible time interval (e.g., a slidingwindow of time), unless this functionality is provided by the sensorsthemselves. In this manner, the sensors 208 and 210 can be polled inreal time using reduced amounts of CPU and system bandwidth.

Although not shown in FIG. 2, the system 200 can include other sensors,particularly temperature sensors. The temperature sensors can besituated to measure the temperatures of the CPU 202 and GPU 204, otherinternal components, and the skin (surface) temperature of the deviceincorporating the system 200. These other sensors can be coupled to theembedded controller (EC) 214 via a respective event line and arespective data bus (e.g., a system management bus, SMBus).

In the embodiment of FIG. 2, the EC 214 interfaces with the system BIOS(basic input/output system, SBIOS) functional block 218 via a low pincount (LPC) bus 220. The SBIOS 218 interfaces with the kernel modedriver functional block 222 according to the ACPI (AdvancedConfiguration and Power Interface) specification.

The EC 214 and SBIOS 218 together provide basic thermal controlincluding control of the temperature sensors and a fan 216 (there may bemultiple fans). The speed of the fan 216 can be adjusted such that itcan be sped up or slowed down. The EC 214 and SBIOS 218 constituteelements of a legacy thermal control system. The inventive thermalmanagement system 130 (FIG. 1) is not necessarily intended to replacethe legacy thermal control system; instead, the thermal managementsystem 130 and the legacy thermal control system can workcooperatively—but under control of the thermal management system 130—toallow enhanced software control (e.g., the ability to more intelligentlyset thermal control policies for the CPU and GPU and to controlcross-influence) and to increase system robustness.

Before taking control, the thermal management system 130 performs ahandshake with the legacy control system, so that the legacy controlsystem will relax its thresholds in deference to those implemented bythe system 130. For example, a cookie (in general, a private value knownonly to the system 130 and the legacy system) can be exchanged. Awatchdog timer (not shown) is maintained between the system 130 and thelegacy system, so that the legacy system can detect if the system 130 isno longer functional and reinstate the more conservative legacy thermalcontrols. However, the thermal management system 130 can be implementedautonomously. In either case, the thermal management system 130 can beimplemented using existing system interfaces.

Elements of the thermal management system 130 (FIG. 1) can beimplemented across the various blocks described above. In the FIG. 2embodiment, the thermal management system 130 runs in the kernel modedriver 222 and/or the on-chip SMU 206, in conjunction with the basicthermal control provided by the EC 214 and the SBIOS 218.

The thermal management system 130 collects data from the sensors 208 and210 that are connected to the SMU 206 via the I2C bus 212. In general,the SMU 206 can identify when a threshold is crossed and can read datafrom the sensors 208 and 210 through the bus 212; in one embodiment, theSMU 206 reads data in response to an event signal sent by the sensors.Processing of the sensor data can be done by the sensors themselves orby the SMU 206, to reduce the amount of overhead on the EC 214. Whendata for the EC 214 is available, the SMU 206 can send an alert 224 tothe EC 214, which can read the data via the SMBus 226. The EC 214 canthen throttle the CPU 202 and/or GPU 204 if a shared budget limit isexceed, as described in conjunction with FIGS. 4A, 4B, and 4C, below.Thus, instead of consuming CPU bandwidth and impacting systemperformance, the thermal management system 130 has the benefit of lowoverhead.

FIG. 3 is a functional block diagram of another example of a platform orsystem 300 upon which embodiments according to the invention can beimplemented. Only selected hardware and software elements are shown; thesystem may include other elements not shown or described. The system 300may be implemented as part of a computer system, such as but not limitedto a notebook or nettop type of device.

A difference between the system 200 of FIG. 2 and the system 300 is thatthe latter utilizes a discrete GPU (dGPU) 304, which may be implementedon a video card. The GPU 304 incorporates an on-chip power managementunit (PMU) 306, which can be implemented in hardware, as amicrocontroller, for example.

With regard to thermal management, elements in FIG. 3 have, in general,the same functionality as similarly named elements in FIG. 2. Also, thePMU 306, in general, performs the same thermal management functions asthose associated with the SMU 206 of FIG. 2. However, in the FIG. 3embodiment, the system includes a user mode driver 330 in addition tothe kernel mode driver 222. Accordingly, the thermal management system130 runs in the kernel mode driver 222, the user mode driver 330, and/orthe on-chip PMU 306.

The operation of the thermal management system 130 is described inconjunction with the examples of FIGS. 4A, 4B, and 4C. CPU power and GPUpower are measured over time using the power sensors 208 and 210 (FIGS.2 and 3), respectively. Instantaneous values of CPU and GPU power canalso be measured. The integral value of power (the measured power over awindow of time) can be determined (computed) in any of a variety ofways. For example, power measurements taken over a window of time can beaveraged, and the average can be multiplied by the length of the window.The integrated power value is determined for sliding, overlappingwindows of time. FIGS. 4B and 4C show examples of the integrated powervalue as a function of time for the CPU and the GPU, respectively—eachvertical line in the figures represents an integrated value for a sampleperiod (a particular window in time). FIG. 4A shows the total integratedpower for the CPU and the GPU; that is, FIG. 4A represents the sum ofthe values in FIGS. 4B and 4C.

An advantage associated with the use of integrated power values is thatpower spikes (in general, fast transients) will be accounted for in theintegrated values. Components do not heat or cool instantaneously; theyhave relatively long thermal time constants that have a dampeningeffect. Thus, advantageously, the thermal management system 130 will notrespond to an isolated power spike; bursts in performance that mightexceed thermal parameters are permitted provided that the burst is notsustained. However, the thermal management system 130 will respond ifthe aggregate effect of bursts within a sample period causes the totalintegrated power to exceed the budget. In other words, the thermalmanagement system 130 is more tolerant of bursty performance withoutimpacting the ability of the thermal management system to intercede whenneeded.

The information represented in FIGS. 4A-4C can also be used to determinea moving average and a rate of change, which in turn can be used topredict integrated power values, and optionally to predict temperatures,for future time periods.

FIG. 4A also shows a single, shared budget that is applied to both theCPU and GPU. The budget may be a shared thermal power budget, a sharedsupply power budget, or a combined use of both the shared thermal powerbudget and the shared supply power budget.

In the example of FIG. 4A, the budget is constant over time. In actualpractice, the budget may vary with time. In general, the budget may bechanged in response to any of a variety of monitored parameters or dueto changes in the monitored system. For instance, the budget may changedynamically as a result of changing fan speed(s), or due to changes inambient temperature or skin temperature, or due to the influence ofother components in the computer system that preheat the circulating airbefore it reaches the heat exchanger (in an evacuative cooling system).

The budget itself is an integral value. If the budget is a constantvalue, then the budget is simply that value times the length of eachsliding window of time. If the budget is dynamic, then the budget is theintegral of the budget versus time for each sliding window of time.

For a given ambient temperature and at a point in time, the budget canbe determined by the SBIOS 218 or the EC 214 (FIGS. 2 and 3) using thefollowing equation:

Budget=(Max−Min)*Fan/100+Min;

where “Max” is the maximum cooling power (in watts) with full (100percent) fan speed at the given ambient temperature, “Min” is theminimum cooling power (in watts) with minimum (zero percent) fan speedat the given ambient temperature, and “Fan” is the fan speed expressedas a percentage of full speed. Changes in the budget can be conveyed tothe thermal management system 130 (FIG. 1) via the interfaces betweenthe EC 214 and SBIOS 218 and the drivers 222 and 330 (FIGS. 2 and 3).

If the total integrated power remains below the budget, then the CPU andGPU are allowed to continue to operate in their current state (e.g.,their current p-state). If the total integrated power exceeds thebudget, as shown in the circled portion of FIG. 4A, then the state ofeither or both the CPU and GPU is adjusted, depending on the controlpolicy in place.

The use of integrated power, instead of temperature or simply power, andthe use of a single, shared power budget provide a number of advantages.As mentioned above, components do not heat or cool instantaneously; theyhave relatively long thermal time constants. Therefore, managing usingonly temperature or power can be disadvantageous because relatively longperiods of active cooling (e.g., increased fan speed, resulting in anoisier system) or passive cooling (e.g., CPU throttling, resulting inreduced performance) may be prescribed unnecessarily in order to producea noticeable change. Consequently, drastic and choppy changes in theuser's experience may be induced as the system alternately overshootsand undershoots the target temperature. The inventive power managementsystem avoids these disadvantages—since a rise in power precedes a risein temperature, and since the integrated power value provides anindication of sustained higher power levels, then by measuring andmonitoring the total integrated power and detecting when it exceeds thebudget, it is possible to predict further thermal excursions and toadjust the CPU state and/or the GPU state accordingly.

Furthermore, in order to provide satisfactory thermal management usingpower and/or temperature, conventional control systems require detailedcharacterization of each platform's thermal resistance and thermal timeconstants. Accumulation of such data can be burdensome, requiringcomplex tools to inject thermal transients into a test system and tomodel and analyze thermal responses. The inventive power managementsystem avoids these disadvantages; it is not necessary to preciselycharacterize the system/platform, especially when the inventive systememploys fuzzy logic control, as described further below. In other words,the thermal management system 130 (FIG. 1) is more tolerant of lessprecise thermal parameters without adversely impacting the ability ofthe thermal management system to control temperature within designlimits.

Also, as noted previously herein, the power sensors 208 and 210 (FIGS. 2and 3) may experience fast spikes that are not relevant or require noaction unless they are of a sustained nature. By utilizing power overtime, trending, and averaging instead of instantaneous fluctuations insensor data, the amount of data traffic can be significantly reduced.

According to embodiments of the invention, a variety of differentcontrol policies can be defined, each having a different goal orpriority or aimed at achieving a user's particular preferences. Forexample, a GPU-centric control policy may favor the GPU such that theCPU but not the GPU is throttled when the budget is exceeded; aCPU-centric control policy may favor the CPU such that the GPU but notthe CPU is throttled when the budget is exceeded; an adaptive controlpolicy may throttle both the CPU and GPU when the budget is exceeded;and a battery-centric policy may throttle the CPU and/or GPU even if thebudget is not exceeded but performance is not affected, in order toextend battery life (extend the time between charges).

Different forms of each control policy may also exist to account fordifferences that might affect a particular policy. For example,different forms of each policy may exist to account for differencesacross different systems and platforms. For example, one form of acontrol policy may be used if the GPU heat pipe and heat exchanger areplaced in front of the CPU, and another form of that control policy maybe used if the order of placement is reversed.

Policy options—with regard to the choice of policy, or with regard tochoices within each policy—can be made available to a user, allowingcustomization according to the user's personal preferences. Userpreferences can be stored in a user profile accessible to the thermalmanagement system 130.

Policy options can also be specified according to operating systempreferences and platform-specific (designer/manufacturer) preferences.For example, an operating system may specify different prescribed powerpolicy schemes depending on the type of device (e.g., a laptop versus adesktop). Also, for example, the operating system can detect whether ornot a battery charger is plugged in or not, and may pick either a policyto maximize battery life if the charger is plugged in or a policy tomaximize performance if the charger is not plugged in.

Regarding a battery-centric policy, a priori application profilinginformation can be associated with each application. The applicationprofiling can include information that identifies an application as awasteful application. The application profiling information can alsoinclude information that indicates whether the application's performancescales more dependently on the CPU or the GPU.

Driver loading information can be used to detect when a particularapplication is executing. The percent utilization of the CPU and the GPUcan also be measured; thus, it is possible to determine how heavilyloaded the CPU and GPU are. The application profiling information, alongwith the other information including user profile information, can beused to identify when the p-state of the CPU or GPU can be limitedwithout significantly affecting performance, visual experience, orquality. Thus, the thermal management system 130 can detect scenarios inwhich the CPU or GPU are wasting power and consequently can proactivelylimit wasted power without necessarily limiting performance.

In one embodiment, the management of platform cooling capabilities,platform outside skin temperature, and thermal and supply powerconstraints, other than those directly managed by the system 130, aremanifested in the supply power budget and thermal power budget conveyedto the system 130.

In one embodiment, the control policies are implemented using a fuzzylogic control system. However, control policies can instead beimplemented using a proportional control system.

In summary, according to embodiments of the invention, theresponsibility for management of a CPU and a GPU can be transitioned,from the legacy system to the system 130, in response to participationof the more optimal power management system 130, and in reverse to anysubsequent removal or disabling of said management. The platform canspecify the supply power and thermal power budgets to the powermanagement system whenever a substantial platform level change occurswhich would affect the CPU and GPU budgets. For example, the platformcan change the budgets in response to a change in platform coolingcapabilities as determined by fan speed, case internal or case-externaltemperatures. For example, the platform can change the budgets inresponse to a change in platform power supply capabilities as determinedby a change in power source, or a changed in power capacity limits. Themanagement of platform cooling capabilities, platform outside skintemperature, and thermal and supply power constraints, other than thosedirectly managed by the system 130, is manifested by the platform in thesupply power budget and thermal power budget conveyed by the platform tothe system 130.

Regulating Power Using a Fuzzy Logic Control System

FIG. 5 is a functional block diagram showing the flow of information inan example of a fuzzy logic control system 500 according to anembodiment of the invention. The fuzzy logic control system 500 can beimplemented as part of the thermal management system 130 of FIG. 1, ascomputer-executable instructions residing on some form ofcomputer-usable medium.

In the fuzzification block 504, the input values 502 can be expressed asfuzzy value sets that describe the input values by ranges, as describedfurther in conjunction with FIGS. 6 and 7. Examples of input values forthe control system 500 include, but are not limited to: the sharedbudget; measured CPU and GPU power levels over sliding windows of time;the integral values of the measured power values per sample period; therate of change of the measured and/or integral power values; and themoving average of the measured and/or integral power values. Otherinputs include, but are not limited to: temperature values;identification of executing applications; application profilinginformation; user profile information; and CPU and GPU loading andpercent utilization.

Continuing with reference to FIG. 5, the control rules 506 include alist of fuzzy logic rules which prescribe output actions for a givenfuzzy set of inputs. In one embodiment, the control rules are expressedin terms of heuristics. Examples of fuzzy logic control rules areprovided below for an implementation in which the GPU is favored overthe CPU in a system in which the CPU heat exchanger is in front of theGPU heat exchanger:

a. If (Skin Temperature ≧ Very High) Reduce GPU Limit by 1 Level ReduceCPU Limit by 1 Level b. If (CPU Temperature ≧ Very High) Reduce CPULimit by 1 Level c. If (GPU Temperature ≧ Very High) Reduce GPU Limit by1 Level d. If (Under Shared Budget) and (CPU Temperature < High) ReleaseCPU limits e. If (Under Shared Budget) and (GPU Temperature < High)Release GPU limits f. If (Around Shared Budget) and (Integral Burden isNear Flat) and (Skin Temperature < Very High) Do Nothing g. If (OverShared Budget) and (Integral Burden is Flat or Positive) and (SkinTemperature < High) Do Nothing h. If (Over Shared Budget) and ((CPUtemperature > High) or (Integral Burden is Over)) Reduce CPU Limit by 1Level i. If (Over Shared Budget) and ((GPU temperature > High) or(Integral Burden is Over)) Reduce CPU Limit by 1 Level // if prefer-GPUthen always borrow from the CPU, don't assume it's throttled Reduce GPULimit by 1 Level j. If (Very Over Shared Budget) and (Integral Burden isVery Over) Reduce CPU Limit by 2 Levels Reduce GPU Limit by 1 Level

Different bodies (sets) of the control rules 506 may be defined andselectively applied to implement different control policies, such as thecontrol policies mentioned previously herein.

As can be seen from the examples above, fuzzy logic rules introducelinguistic variables with natural language values that, as shown in theexample of FIG. 7, can correspond to a range of numerical values.Accordingly, the fuzzy logic rules naturally include hysteresis; adegree of variability in the numerical inputs (e.g., the measured powervalues) will not necessarily result in a change to the input values 502,nor will those variations necessarily result in a change in the outcomeof a rule evaluation.

In one embodiment, the control rules 506 of FIG. 5 are appliedconcurrently (in parallel), and the outcome (decision) from each rule iscorrelated in the correlation product block 508, yielding a range ofcontrol decisions that are evaluated in the solution block 510.Alternatively, the rules can be applied serially. Output actions canalso be mapped to fuzzy ranges, which has the advantage of allowing theoutput actions to be customized for different system components anddifferent p-states.

The centroid defuzzification block 512 maps the range of solutions to acrisp output (control) setting 514 for the particular system/platformbeing managed. The control setting 514 may be, for example, a throttleadjustment such as reduce (or increase) the CPU and/or the GPU p-stateby one or more levels.

In one embodiment, the fuzzy logic control system 500 is executed onlyif a monitored parameter crosses a predefined threshold; that is, thecontrol rules 506 are evaluated only when one of the input values usedby the rules changes. As noted above, the input values may be expressedin terms of ranges; a monitored parameter may change but not by enoughof an amount to fall outside a given range, in which case the inputvalue to the control rules would not change. Additional information isprovided in conjunction with FIG. 7.

The sets describing the membership of CPU and GPU component power andtemperature measurements, within natural language ranges, are embeddedin the platform firmware such that the control system can apply thecontrol rules independent of the components in a specific platform.

As mentioned above, the thermal management system 130 (FIG. 1) does notrequire exact characterization of the system/platform being managed, nordoes it require precise sensor data, especially when the thermalmanagement system utilizes fuzzy logic control because decisions are, ingeneral, based on ranges of input values. Furthermore, because multiplecontrol rules can be evaluated at the same time, they tend to combinecumulatively to form the correct response. Even a rule that is notsatisfied can help reinforce the correct control action—in other words,a rule may be evaluated, but the decision from that rule may not resultin the need for action; however, that decision is still considered andwill contribute to the selection of a particular control action.

The thermal management system 130 (FIG. 1) supports dynamic loading ofthe rules and set membership (ranges) from the system, allowing specificdesign optimization and customized behaviors of the system to beembedded within the system, and for driver updates to include controlsystem optimizations. The sets describing the membership of CPU and GPUcomponent power and temperature measurements, within natural languageranges, are embedded in the platform firmware such that the controlsystem can apply the control rules independent of the components in aspecific platform. Platform-specific behaviors are supported by loadingthe control rules from the platform firmware. Thresholds for sensorevents can be determined by the fuzzy sets loaded from the platform.

FIG. 6 illustrates an example of set membership for a CPU that hasp-states with maximum powers of 10, 20, 30, and 35 watts, respectively.Each p-state is mapped to a range of values and associated with aparticular fuzzy logic linguistic variable; for example, the range ofCPU power from about 20 to 30 watts is in the “High” set. A setmembership for a GPU can be similarly defined. The ranges are flexibleand readily customizable, allowing adjustment for different CPUs andGPUs, or to refine the control system, for example.

Set membership ranges can be described using trapezoids as shown in FIG.6, meaning that the math involved in computing set membership isrelatively simple fixed point multiplication and division. The CPU andGPU set memberships can be summed together, with the resulting totalalso expressed in set membership form (e.g., as trapezoids) to allowevaluation of cooling demands on the shared budget.

FIG. 7 illustrates the mapping of set membership to event (alarm)thresholds in the GPU power sensor 210 of FIGS. 2 and 3. GPU powerranges that map to set membership can be used to derive the eventthresholds. In the example of FIG. 7, the event thresholds correspond tothe half-way points on the sloped sides of the trapezoids; however, theevent thresholds can be mapped to different points on the trapezoids.

Because the input conditions are expressed as range sets, it is possibleto use smart sensors that produce an event signal when an interestingcondition exists or when the input data has changed sufficiently. Thisoffloads the thermal management system 130 (FIG. 1) from having toperform constant polling of the sensors in order to generate input data.Instead, whenever the CPU or GPU power crosses a threshold, an eventsignal (previously described herein) is generated, which ultimately endsup causing the control system 500 (FIG. 5) to evaluate the control rules506 to determine if any control action is needed. Such mappings allowfor distributed control of the power sensors, without burdening the CPU,while also reducing both the computational requirements for any powermanagement controller and the bandwidth required for the bus to thesensors.

In the example of FIG. 7, GPU power is ramping up from seven watts to 17watts, moving the GPU power into the “High” range. Because the GPU powerhas crossed at least one threshold, the GPU power sensor 210 willgenerate an event signal that is detected by the SMU 206 or PMU 306(FIGS. 2 and 3). As a result of such a signal, measurement data will beread from the CPU and GPU power sensors. Ultimately, that data is usedto compute an integrated power value that is compared to the shared CPUand GPU budget, as previously described herein. More specifically, thecontrol system 500 (FIG. 5) is triggered to use the new power sensordata, as well as other current data and information, to evaluate thefuzzy logic rules and to determine and implement a control action, asneeded.

With reference again to the example of FIG. 7, if instead the GPU powerramped up from seven watts to something less than ten watts, then athreshold would not have been crossed. Consequently, no event signalwould be generated by the GPU power sensor, and the actions justdescribed would not be performed (unless some other monitored fuzzylogic triggered a rules evaluation).

FIG. 7 illustrates the mapping of inputs to fuzzy ranges; output actionscan also be mapped to fuzzy ranges, as mentioned above.

Fuzzy sets can also be applied to combine profile data for differentapplications in order to determine if the mix of executing applicationsdepends more on the CPU or the GPU. The tendency of an application tobenefit more from the CPU versus the GPU, or vice versa, is carried inapplication profiling information stored in the driver. When anapplication is detected as being active, its fuzzy classification can becombined with that of other active applications to form a majoritydecision with regard to whether the aggregation of applications arehighly bound to the GPU, somewhat bound to the GPU, somewhat bound tothe CPU, highly bound to the CPU, or evenly bound between the CPU andthe GPU. This type of information is useful in determining whether it isbetter to throttle the CPU or the GPU first in response to a thermalexcursion if both the CPU and the GPU appear to be fully utilized and atfull power. If the mix of executing applications is strongly biasedtoward the CPU (that is, they rely computationally more on the CPU thanon the GPU), then the CPU should be favored and the GPU should bethrottled first, giving the CPU more of the budget; conversely, if themix of executing applications is strongly biased toward the GPU (thatis, they rely computationally more on the GPU than on the CPU), then theGPU should be favored and the CPU should be throttled first, giving theGPU more of the budget.

As another example, if an executing application is more bound to theGPU, for instance, or if the application is known to waste power whilethe CPU polls the GPU to determine if the GPU is finished, then the CPUmay be proactively throttled to improve battery-life while retainingperformance.

FIG. 8 is a flowchart 800 of an example of a computer-implementedthermal management method according to an embodiment of the invention.Flowchart 800 can be implemented as computer-executable instructionsresiding on some form of computer-usable medium.

In block 802, a metric comprising an integral value of power utilized bya first plant (e.g., a CPU) and power utilized by a second plant (e.g.,a GPU) over a period of time is compared to a budget for that period oftime. In block 804, a state of the CPU and a state of the GPU areregulated to keep the metric within the budget.

FIG. 9 is a flowchart 900 of an example of a computer-implementedthermal management method according to another embodiment of theinvention. Flowchart 900 can be implemented as computer-executableinstructions residing on some form of computer-usable medium.

In block 902, input values that characterize a system in operation(e.g., the systems 200 and 300 of FIGS. 2 and 3, respectively) areaccessed. In block 904, the input values are used to evaluate a set offuzzy logic rules. In block 906, the state of the CPU and the state ofthe GPU are regulated according to the outcome of the rules evaluations.

Embodiments according to the present invention are thus described. Whilethe present invention has been described in particular embodiments, itshould be appreciated that the present invention should not be construedas limited by such embodiments, but rather construed according to thebelow claims.

1. A system comprising: a central processing unit (CPU); and a graphicsprocessing unit (GPU) coupled to the CPU; wherein power used by the CPUand power used by the GPU are regulated in tandem using a fuzzy logiccontrol system operable for implementing a plurality of fuzzy logicrules.
 2. The system of claim 1 wherein inputs to the fuzzy logiccontrol system include a metric representing a combined measure oftemperature and power used by the CPU, and the temperature and powerused by the GPU, wherein a state of the CPU and a state of the GPU areregulated to maintain the metrics within a shared supply power andthermal power budget.
 3. The system of claim 1 wherein the plurality offuzzy logic rules comprises subsets of the fuzzy logic rules, whereinthe subsets correspond to different control policies with differentpriorities.
 4. The system of claim 3 wherein a subset of the fuzzy logicrules is implemented based on a selection made by an end user of thesystem.
 5. The system of claim 1 wherein inputs to the fuzzy logiccontrol system include pre-determined profile information for anexecuting application.
 6. The system of claim 1 further comprising: afirst sensor operable for measuring power used by the CPU; and a secondsensor operable for measuring power used by the GPU, wherein the firstand second sensors are operable for sending an event signal when athreshold is crossed and wherein, in response to the event signal, thefuzzy logic rules are evaluated.
 7. The system of claim 1 wherein setsdescribing membership of CPU and GPU component power and temperaturemeasurements, within natural language ranges, are embedded in firmwaresuch that control rules can be applied independent of components in aspecific platform.
 8. The system of claim 7 wherein platform-specificbehaviors are supported by loading the control rules from the firmware.9. A computer-implemented method for managing a system comprising acentral processing unit (CPU) and a graphics processing unit (GPU), themethod comprising: accessing a plurality of input variables havingvalues that characterize the system in operation; evaluating a pluralityof fuzzy logic rules using the values; and regulating a state of the CPUand a state of the GPU according to a result of the evaluating.
 10. Themethod of claim 9 wherein the values comprise a metric representing acombined measure of power used by the CPU and power used by the GPU,wherein the state of the CPU and the state of the GPU are regulated incombination to maintain the metric within a shared power budget.
 11. Themethod of claim 9 wherein the plurality of fuzzy logic rules comprisessubsets of the fuzzy logic rules, wherein the subsets correspond todifferent control policies with different priorities.
 12. The method ofclaim 9 further comprising selecting a subset of the fuzzy logic rulesbased on a selection made by an end user of the system.
 13. The methodof claim 9 wherein the values comprise pre-determined profileinformation for an executing application.
 14. The method of claim 9further comprising evaluating the fuzzy logic rules in response to anevent signal from one of a first sensor operable for measuring powerused by the CPU and a second sensor operable for measuring power used bythe GPU, wherein the event signal is triggered when a threshold iscrossed.
 15. The method of claim 9 wherein the variables compriselinguistic variables having natural language values.
 16. A system formanaging a central processing unit (CPU) and a graphics processing unit(GPU), the system comprising: a management unit operable for executing afuzzy logic control system operable for implementing a plurality offuzzy logic rules; and a controller coupled to the management unit andoperable for regulating power used by the CPU and power used by the GPUaccording to an output of the control system.
 17. The system of claim 16wherein inputs to the fuzzy logic control system comprise a metricrepresenting a combined measure of power used by the CPU and power usedby the GPU, wherein a state of the CPU and a state of the GPU areregulated to maintain the metric within a shared power budget.
 18. Thesystem of claim 16 wherein the plurality of fuzzy logic rules comprisessubsets of the fuzzy logic rules, wherein the subsets correspond todifferent control policies with different priorities.
 19. The system ofclaim 18 wherein a subset of the fuzzy logic rules is implemented basedon a selection made by an end user of the system.
 20. The system ofclaim 16 wherein inputs to the fuzzy logic control system comprisepre-determined profile information for an executing application.
 21. Thesystem of claim 16 wherein the fuzzy logic rules are evaluated inresponse to an event signal from one of a first sensor operable formeasuring power used by the CPU and a second sensor operable formeasuring power used by the GPU, wherein the event signal is triggeredwhen a threshold is crossed.